﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using ST.Torch.WebApi.Core.Extensions;
namespace ST.Torch.WebApi.Web.Entry.Areas.SYS.Controllers
{
    [Area("SYS")]
    [AppAuthorize]
    public class UserController : Controller
    {
        [AllowAnonymous]
        public IActionResult Index()
        {
            return View();
        }
        [AllowAnonymous]
        public IActionResult IndexTest()
        {
            return View();
        }
        public IActionResult AddOrEdit()
        {
            return View();
        }
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <returns></returns>
        public IActionResult EditPass()
        {
            return View();
        }


        /// <summary>
        /// 分配角色
        /// </summary>
        /// <returns></returns>
        public IActionResult AssignmentsRole()
        {
            return View();
        }
        [HttpPost]
        public async Task<ActionResult> RenderViewToString([FromForm] string viewName, [FromForm] List<string> model = null)
        {
       
            string HtmlStr = await this.RenderViewToStringAsync(viewName, (object)model);
            return Content(HtmlStr);
        }
    }
}
